package com.skwen.android_room.bean;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity
public class Books {

    //主键必须添加 默认不自增,这里我们直接使用自增
    @PrimaryKey(autoGenerate = true)
    private Long id;

    //此注解可不添加，默认使用实体名称
    @ColumnInfo(name = "book_name")
    private String name;

    private String price;

    private String author;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }
}
